package com.xinghanlaser.applet.base.oss.model;

import com.xinghanlaser.applet.base.oss.service.BucketType;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import java.util.List;

@AllArgsConstructor
@NoArgsConstructor
@Data
@Builder
public class BigFileUploadCompleteParam {
    /**
     * 桶名
     */
    @NotBlank(message = "bucketName不能为空",groups = {BucketType.specificBucket.class})
    private String bucketName;

    /**
     * 上传标识ID
     */
    @NotBlank(message = "uploadId不能为空",groups = {BucketType.defaultBucket.class, BucketType.specificBucket.class})
    private String uploadId;

    /**
     * 对象名
     */
    @NotBlank(message = "objectName不能为空",groups = {BucketType.defaultBucket.class, BucketType.specificBucket.class})
    private String objectName;

    /**
     * 分片文件上传结果集
     */
    @NotEmpty(message = "partETagList不能为空",groups = {BucketType.defaultBucket.class, BucketType.specificBucket.class})
    private List<PartDTO> partETagList;
}
